<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/jquery-3.1.1.js"></script>
</head>

<body>

<div id="contentDiv"></div>

<input type="button" value="获取数据" onclick="getData()"><br>

<script>
    function getData() {
        $.ajax({
            url: '/books',
            type: 'get',
            success: function (msg) {
                console.log(JSON.stringify(msg))
                $("#contentDiv").html(JSON.stringify(s));
            }
        })
    }
</script>

</body>
</html>
